package com.wuhuahe.learning.lagou.service.autodeliver.controller;


import com.wuhuahe.learning.lagou.servie.feign.api.ResumeFeignApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/autodeliver")
public class AutodeliverController {

    @Autowired
    private ResumeFeignApi resumeFeignApi;

    /**
     * 使用ribbon负载均衡
     *
     * @param userId
     * @return
     */
    @GetMapping("/checkState/{userId}")
    public String findResumeOpenState3(@PathVariable Long userId) {
        String forObject = resumeFeignApi.findDefaultResumeState2(userId);
        return forObject;
    }
}
